package com.itheima.reggie.common;

import com.itheima.reggie.domain.Employee;

/**
 * @Author fanYuLe
 * @Date 2023/3/4 16:32
 * @Blog blog.fanYuLe.net/996.mba
 * @Description:
 */
public class EmployeeHolder {
    private static final ThreadLocal<Employee> TL=new ThreadLocal<>();
    //存
    public static void  set(Employee employee){
        TL.set(employee);
    }
    //取
    public static Employee get(){
        return TL.get();
    }
    //删
    public static void remove(){
        TL.remove();
    }
}

